﻿CREATE TABLE [dbo].[tblCampaignDetail] (
    [CampaignDetailID]      INT           IDENTITY (1, 1) NOT NULL,
    [CampaignID]            INT           NOT NULL,
    [CampaignDispositionID] INT           NOT NULL,
    [CreateDate]            SMALLDATETIME NOT NULL,
    [LastUpdateDate]        SMALLDATETIME NULL,
    [NextCallTime]          SMALLDATETIME NULL,
    [LastCallID]            INT           NULL,
    [UserID]             int  NULL,
    [OrderID]               INT           NULL,
    [CustomerNumber]        INT           NULL
);
GO
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Defines exactly one person in a campaign.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The CampaignDetail ID', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'CampaignDetailID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The Campaign ID.  See tblCampaign.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'CampaignID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The campaign disposition Id.  See codeCampaignDisposition.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'CampaignDispositionID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Date the customer entered the campaign.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'CreateDate';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Date the record was updated last.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'LastUpdateDate';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The date/time for the next call.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'NextCallTime';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Identifier referencing the last call.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'LastCallID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Name of the agent who placed the call', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'UserID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Reference to the order the record is associated with.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'OrderID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Reference to the customer record.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblCampaignDetail',
	@level2type = N'COLUMN', @level2name = N'CustomerNumber';

